package guda.demox.web.action;

import guda.demox.biz.BlogBiz;
import guda.demox.common.util.helper.helper.JsonResult;
import guda.demox.common.util.helper.helper.PageQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by well on 17/6/8.
 */
@Controller
public class BlogAction {

    @Autowired
    private BlogBiz blogBiz;

    @RequestMapping("index")
    @ResponseBody
    public JsonResult index(){
        JsonResult jsonResult = JsonResult.getInstance();
        jsonResult.getData().put("acb",blogBiz.list(new PageQuery()));
        return jsonResult;
    }
}
